package org.destinyshine.cricket.container;

import org.destinyshine.cricket.connector.Connection;
import org.destinyshine.cricket.server.LifecycleException;

import javax.servlet.Servlet;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by jianyu.liu@hnlark.com on 2016/6/11.
 *
 * @author jianyu.liu@hnlark.com
 */
public class ServletWrapper  extends AbstractContainerComponent{

    private final String servletName;

    private final Servlet servlet;

    private final Map<String, String> initParams;
    private final int loadOnStartup;

    private WebApplicationContext webApplicationContext;

    public ServletWrapper(String servletName, Servlet servlet, Map<String, String> initParams, int loadOnStartup) {
        this.servletName = servletName;
        this.servlet = servlet;
        this.initParams = initParams;
        this.loadOnStartup = loadOnStartup;
    }

    public String getServletName() {
        return servletName;
    }

    public Servlet getServlet() {
        return servlet;
    }

    @Override
    protected void initInternal() throws LifecycleException {

    }

    @Override
    protected void startInternal() throws LifecycleException {

    }

    @Override
    protected void stopInternal() throws LifecycleException {

    }

    @Override
    protected void destroyInternal() throws LifecycleException {

    }

    @Override
    public void recevieConnection(Connection connection) {

    }
}
